import React, {Component} from 'react';
import Taro from '@tarojs/taro';
import {WebView} from '@tarojs/components'

export default class Apply extends Component {
  UNSAFE_componentWillMount() {
    if (Taro.getCurrentInstance().router.params.url) {
      this.link = Taro.getCurrentInstance().router.params.url
    } else {
      Taro.navigateBack({
        delta: 1
      })
    }
  }

  link = ''

  render() {
    return (
      <WebView src={Taro.getCurrentInstance().router.params.url}/>
    )
  }
}
